package com.SpringBoot.orderDetail.controller;


import com.SpringBoot.Util.Result;
import com.SpringBoot.orderDetail.service.OrderDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bxk
 * @since 2025-09-15
 */
@Controller
@RestController
@RequestMapping("/order-detail")
public class OrderDetailController {

    private final OrderDetailService orderDetailService;

    public OrderDetailController(OrderDetailService orderDetailService) {
        this.orderDetailService = orderDetailService;
    }

    @GetMapping("/getOrderDetailCount")
    public Result getOrderDetailCount() {return orderDetailService.getOrderDetailCount();}

    @GetMapping("/completionRate")
    public Result completionRate() {return orderDetailService.completionRate();}

}
